Skip to content

Conversation

Syed007Hassan
Copy link

@Syed007Hassan Syed007Hassan commented Sep 13, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • [✅] Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

This boilerplate is equipped with a simple CRUD for two entities User(Employee) and Employer that shares a common auth module. The PostgreSQL database is used with TypeORM for interacting with database. JWT auth with access and refresh token strategy is setup for protected routing.

Issue Number: N/A

What is the new behavior?

PostgreSQL with TypeORM

Does this PR introduce a breaking change?

  • Yes
  • [✅] No

Other information

All other info is mentioned in readme.md file

@@ -0,0 +1,8 @@
MONGODB_URI=
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you can add the env file gitignore and change it to sample.env

@@ -0,0 +1,25 @@
// module.exports = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is commented?

// rules: {
// '@typescript-eslint/interface-name-prefix': 'off',
// '@typescript-eslint/explicit-function-return-type': 'off',
// '@typescript-eslint/explicit-module-boundary-types': 'off',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the prettier rule here like single route to true etc

{
"singleQuote": true,
"trailingComma": "all"
} No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add sem to false and tabWidth to 2

@@ -0,0 +1,96 @@
# NestJS Boilerplate

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some more details here to describe the project's core features.

}

@Post('loginEmployer')
@HttpCode(HttpStatus.OK)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add ApiResponse here

}

@Post('verify-jwt')
@HttpCode(HttpStatus.OK)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add ApiResponse here

}
}

// This route is protected by the JwtGuard
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove comments

useFactory: () => ({
secret: process.env.JWT_SECRET,
signOptions: {
expiresIn: '3d',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add expires in to env file

EmployerModule,
JwtModule.registerAsync({
useFactory: () => ({
secret: process.env.JWT_SECRET,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call env var from config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants